import org.eclipse.jface.action.*;
//import org.eclipse.jface.resource.*;
import org.eclipse.jface.window.*;

public class ExitAction extends Action
{
  ApplicationWindow window;
  
  public ExitAction( ApplicationWindow w )
  {
    window = w;
    
    setText( "E&xit@Ctrl+W" );
    //setToolTipText( "Exit the application" );
    
    try
    {
      //setImageDescriptor( ImageDescriptor.createFromImage(img) );
    }
    catch ( Exception e )
    {
      e.printStackTrace();
    }
  }
  
  public void run()
  {
    window.close();
  }
}